<div class="page" data-ng-controller="editMediaCtrl">
    <section class="panel panel-default table-dynamic">
        <div class="panel-heading">
            <strong>
                <span class="glyphicon glyphicon-th"></span>编辑内容</strong>
        </div>
        <div class="panel-body">
            <div class="col-md-11 col-md-1">
                <form class="form-horizontal form-validation" role="form">

                    <div class="form-group">
                        <label for="title" class="col-sm-2 control-label">标题</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="title" placeholder="请填写标题"
                                   value="{{post.title}}" data-ng-model="post.title"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="title" class="col-sm-2 control-label">类型</label>
                        <div class="col-sm-10">
                            <span class="ui-select">
                                <select ng-change="typeSelectAction()" ng-model="post.article_type"
                                        ng-options="value.id as value.label for value in typeOptions"></select>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="iconFileInput" class="col-sm-2 control-label">上传封面</label>
                        <div class="col-sm-10">
                            <input type="file" title="选择内容图片" id="iconFileInput" data-ui-file-upload
                                   class="btn-primary"/>
                        </div>
                    </div>

                    <!--封面 -->
                    <div class="form-group" >
                        <label for="cover" class="col-sm-2 control-label">封面图片Url</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="cover" placeholder="请填写封面图片的Url地址"
                                   value="{{post.cover_url}}" data-ng-model="post.cover_url"/>
                            <div class="space"></div>
                            <img ng-src="{{post.cover_url}}" class="img-round img-content" width="100%"/>
                        </div>
                    </div>

                    <div class="form-group" ng-if="post.article_type == 9">
                        <label for="cover" class="col-sm-2 control-label">视频地址Url</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="videoUrl" placeholder="请填写视频链接地址"
                                   value="{{post.video_url}}" data-ng-model="post.video_url"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="" class="col-sm-2 control-label">内容</label>

                        <div class="col-sm-10">
                            <div id="editor-trigger" style="height: 620px">
                            </div>
                        </div>

                    </div>
                    <div class="form-group">
                        <label for="" class="col-sm-2 control-label">状态</label>
                        <div class="col-sm-10">
                            <span class="ui-select">
                                <select ng-change="statusSelectAction()" ng-model="post.status"
                                        ng-options="value.id as value.label for value in statusOptions"></select>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-success btn-w-md pull-right"
                                    data-ng-click="savePost()">保存
                            </button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </section>


</div>